﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Avatar.Model;
using AvatarHelper;

public partial class UserControl_Default_ENewsPaper : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            using (var _adc = DBHelper.GetDataContext())
            {
                var _category = _adc.ENewsPaperConfig.FirstOrDefault();
                if (_category != null)
                {
                    Paper.ImageUrl = _category.Icon;

                }
                else
                {
                    Paper.Visible = false;
                }
            }
        }
    }
}
